package com.example.xwcommon.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@TableName("weibos")
public class Weibo {
    @TableId("wb_id")
    private Integer weiboId;
    @TableField("wb_user_loginname")
    private String userName;
    @TableField("wb_title")
    private String title;
    @TableField("wb_content")
    private String content;
    @TableField("wb_createtime")
    private Date createTime;
    @TableField("wb_readcount")
    private Integer readCount;
    @TableField("wb_img")
    private String img;
    @TableField("wb_state")
    private Integer state;

    @TableField(exist = false)
    private Map<String, Object> map=new HashMap<>();

    public Integer getWeiboId() {
        return weiboId;
    }

    public void setWeiboId(Integer weiboId) {
        this.weiboId = weiboId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getReadCount() {
        return readCount;
    }

    public void setReadCount(Integer readCount) {
        this.readCount = readCount;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Map<String, Object> getMap() {
        return map;
    }

    public void setMap(Map<String, Object> map) {
        this.map = map;
    }

    @Override
    public String toString() {
        return "标题："+ this.title +"\n 内容："+ this.content;
    }
}
